
<!DOCTYPE html>
<html>
<head>
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>

<link rel="stylesheet" type="text/css" href="theme/layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="theme/default/css/common.css">
<script src="theme/default/Js/Common.js"></script>
<script src="theme/default/Js/jquery-3.0.0.min.js"></script>
<script src="theme/default/js/artDialog.js?skin=blue"></script>
<link rel="stylesheet" type="text/css" href="include/webupload/webuploader.css">
<script src="include/webupload/webuploader.min.js"></script> 
<script src="include/webupload/uploads.js"></script>
<link rel='stylesheet' type="text/css" href='theme/desktop/css/font-awesome.min.css'>

</head>
<body>

<script>
	<!-- 附件记录必填项提示
	function CheckInput()
	{
		if(document.all.s_class.value == ""){art.dialog({title: 'Error',time: 1,icon: 'warning',content: '未选择分类!'});document.all.s_class.focus();return false;}
		if(document.all.s_file.value == ""){art.dialog({title: 'Error',time: 1,icon: 'warning',content: '未选择要上传的附件!'});document.all.s_file.focus();return false;}
	}
	-->
</script> 
<!----------------------------------------上传文件开始----------------------------------------> 
<!----------------------------------------上传文件开始---------------------------------------->
<div class="cssout">
  <form class="layui-form" name="save" action="?action=Soft&stype=saveadd&LaiLu=" method="post" onSubmit="return CheckInput();">
    <div class="cssin">
      <ul>
        <li class="w100 bg"><dd class="isin"><B>上传文件</B></dd></li>
        <li class="w25 bg cl tr"><dd class="isin"><font color="#FF0000">*</font>文件分类</dd></li>
        <li class="w75"><dd class="isin">
  <select name="s_class" id="Select_SoftClass"><option value="">请选择</option><option value="导出存档">导出存档</option><option value="公用文档">公用文档</option><option value="我的文档">我的文档</option></select>
          <a class="btn1 btnxinz" onclick='Select_SoftClass("set_select_add.asp?action=select_add&stype=add&otype=Select_SoftClass&LaiLu=")'><i class="fadd fa-plus-square"></i>新增</a>
          
          <script>function Select_SoftClass(Dourl) {$.dialog.open(Dourl, {title: '新增选项值', width: 500, height: 400,fixed: true}); };</script></dd> 
        </li>
        <li class="w25 bg cl tr"><dd class="isin">是否共享</dd></li>
        <li class="w75"><dd class="isin">
          <input name="s_share" type="radio" class="btns" value="1" title="是">
          <input name="s_share" type="radio" class="btns" value="0" checked title="否"></dd></li>
        <li class="w25 bg cl tr"><dd class="isin"><font color="#FF0000">*</font>文件选择</dd></li>
        <li class="w75">
		
<dd class="isin">
<input name="s_title" type="hidden" id="s_title" value="">
<input name="s_file" type="hidden" id="s_file" value="">
          
<span id="name1"> </span>
<script>
//定义一个上传
var upName1 = $("#name1").powerWebUpload(
{ 
	auto: true,//上传后是否自动上传
	fileNumLimit:1,//允许上传个数
	accept: {
	   title: '上传文件',
	   extensions: 'gif,jpg,png,bmp,doc,docx,xls,xlsx,ppt,pdf,rar,zip,txt',//允许类型 原始：'gif,jpg,jpeg,bmp,png'
	   mimeTypes: '*'//类型 原始：'image/*'
	}//限制的配置信息
});
upName1.on( 'error', function( file ) {
 //console.log(file);
});
upName1.on( 'fileQueued', function( file ) {
 //console.log(file);
});
 upName1.on('uploadError', function (file) {
 //console.log(file);
 });
//绑定上传完成事件 file 参数中有 原始名称 大小 后缀 类型等等参数；percentage是服务返回的参数 有信息 和图片地址
    upName1.on('uploadSuccess', function (file, percentage) {
	$("#s_title").val(file.name);
	$("#s_file").val(percentage.data.src);
	
});
</script>
          
        </dd></li>
        <li class="w25 bg cl duohang tr"><dd class="isin">
          详情备注</dd></li>
        <li class="w75 duohang"><dd class="isin">
          <textarea name="s_content" rows="4" id="s_content" class="bor int" style="height:65px;width:98%;"></textarea></dd></li>
          <div class="clear"></div>
      </ul>
    </div>
    <div class="h50b"></div>
    <div class="fixed_bg_B">
      <input name="s_user" type="hidden" value="超级管理员">
      <input type="submit" name="Submit" class="btn2 btnbaoc" value="保存">
      <input name="Back" type="button" id="Back" class="btn2 btnguanb" value="关闭" onClick="art.dialog.close();guanbi();">
    </div>
  </form>
</div>
<script>
		var oSel=document.getElementById('Select_SoftClass');
		var oOpn=oSel.options;
		oOpn[1].style.display='none';
		</script>

<script src="theme/default/WdatePicker.js"></script> 
<script src="theme/layui/layui.js"></script> 
<script src="theme/desktop/js/common.js"></script>

<script>
/*弹出窗口封装代码*/
$(".open-app").on("click",function(){
	var width = $(this).data("width")?$(this).data("width"):900,//获得宽度
	height = $(this).data("height")?$(this).data("height"):400//获得高度
	url = $(this).attr("href")//获得打开URL
	title = $(this).attr("title");//获得标题	
	$.dialog.open(url, {title: title, width:width,height:height, fixed: true});
	return false;	
})
</script>

</body>
</html>
